import React from 'react';
import { Routes, Route } from 'react-router-dom';
import './App.css';
import { adminRoutes } from './routes';

function App() {
  return (
    <div className="App">
      <h1> Dashboard</h1>
      <Routes>
        {
          adminRoutes.map(route => {
            return <Route 
              key={route.path} 
              path={route.path.replace('/admin', '')} 
              element={route.Element} 
            />
          })
        }
      </Routes>
      <h3>Admin Footer</h3>
    </div>
  );
}

export default App;
